from lamda.client import *

def check_clock(d):
    app = d.current_application()
    package_name = app.info().packageName
    print(f"当前包名：{package_name}")
    if package_name != "com.zhiliaoapp.musically":
        return
    
    if not d.is_screen_on():
        d.wake_up()
        if  d.is_screen_locked():
            d().fling_from_bottom_to_top()


if __name__ == "__main__":
    d = Device("192.168.12.48", 65008)
    check_clock(d)